import request from "@/utils/request";

// 查询商品扣点列表
export function listBuckle(query) {
  return request({
    url: "/commodity/point/list",
    method: "get",
    params: query,
  });
}

// 查询商品扣点详细
export function getBuckle(id) {
  return request({
    url: "/commodity/point/" + id,
    method: "get",
  });
}

// 新增商品扣点
export function addBuckle(data) {
  return request({
    url: "/commodity/point",
    method: "post",
    data: data,
  });
}

// 修改商品扣点
export function updateBuckle(data) {
  return request({
    url: "/commodity/point",
    method: "put",
    data: data,
  });
}

// 删除商品扣点
export function delBuckle(id) {
  return request({
    url: "/commodity/point/" + id,
    method: "delete",
  });
}
